<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<p:dialog xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" 
	modal="true" width="500" height="300" resizable="false" 
	widgetVar="dialogAddGrupo" id="dialogGrupo" closable="false"
	appendToBody="true">

	<link type="text/css" rel="stylesheet" href="../../resources/css/style.css" />
	
	<f:facet name="header">
		<h:outputText value="Cadastrar Grupo" />
	</f:facet>
	
	<h:form id="formAddGrupo" prependId="false" >
		<p:messages id="messageFormGrupo" autoUpdate="true"/>
		
		<h:panelGrid columns="1" style="padding:5px;">
			<h:outputText value="Código" />
			<p:inputText style="width:100px;" disabled="true" value="#{fornecedorBean.newGrupo.id}"/>
		</h:panelGrid>
		
		<h:panelGrid columns="1" style="padding:5px;">
			<h:outputText value="Grupo *" />
			<p:inputText style="width:210px;" value="#{fornecedorBean.newGrupo.grupo}" required="true" requiredMessage="Informe o grupo." maxlength="30"/>
		</h:panelGrid>

		<h:panelGrid columns="1" style="padding:5px;">
			<h:outputText value="* Campos obrigatórios" />
		</h:panelGrid>
		
		<div id="popup-buttons" style="padding-bottom: 10px;padding-right: 15px; padding-top: 10px; text-align: right;">
			<p:commandButton value="Salvar" style="height:28px;" actionListener="#{fornecedorBean.saveGrupoFromDialog}" icon="ui-icon-disk"/>
			<p:commandButton value="Cancelar" style="height:28px;" actionListener="#{fornecedorBean.closeDialogAddGrupo}" immediate="true" icon="ui-icon-cancel"/>
		</div>
	</h:form>
</p:dialog>